home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / Tools / WB / Scalos / Install.Scalos < prev    next >
Encoding:
Text File  |  2000-05-27  |  11.9 KB  |  638 lines

  1. ; Scalos Installation Script (c)1997 fOX! (17.09.1997)
  2. ; updated (20.02.2000) Budda/SdS
  3.  
  4. (set languages-default 1)
  5.  
  6. ;WICHTIG !!!!!!!!!!!!!!!!!!!
  7. ;APPNAME=Scalos
  8. ;im InstallIcon
  9.  
  10.  
  11. ;===[ ENGLISH ]==============================================================
  12.  
  13. (set language-default 1)
  14.  
  15. (set guides-default 1)
  16.  
  17. (set #bad-kick "You must be using Kickstart 3.0+ to install Scalos")
  18.  
  19. (set #bad-cpu "You require at least a 68020 or higher processor to run Scalos")
  20.  
  21. (set #bad-mui "Requires MUI 3.6+")
  22.  
  23. (set #install-start
  24.     (cat
  25.         "\n\nWelcome to Scalos Installation\n\n"
  26.         "Original by Done by fOX!/ALiENDESiGN\n\nand updated by Budda/SdS"
  27.     )
  28. )
  29. (set #install-exit
  30.     (cat
  31.         "Thank you for installing Scalos ..."
  32.     )
  33. )
  34.  
  35. (set #where-scalos "Where would you like to install Scalos? (no Scalos directory will be created!)")
  36.  
  37. (set #where-scalos-help
  38.     (cat
  39.         "Scalos will be installed directly into the"
  40.         " desired directory. An assign Scalos: is made"
  41.         " right after the creation of the directory"
  42.     )
  43. )
  44.  
  45. (set #where-scalosprefs "Where is the place for the preferences editors?")
  46.  
  47. (set #where-scalosprefs-help
  48.     (cat
  49.         "This is the destination directory of all Scalos preferences"
  50.         " editors!\n\n Normaly ALL Scalos preferences editors are in Scalos:Prefs !"
  51.     )
  52. )
  53.  
  54. (set #languages-select    "Which languages should be installed?")
  55.  
  56. (set #languages-select-help
  57.     (cat
  58.         "Please select your favourite language that should be"
  59.         " copied to your Locale: directory?"
  60.     )
  61. )
  62.  
  63. (set #guides-select    "Which guides should be installed?")
  64.  
  65. (set #guides-select-help
  66.     (cat
  67.         "Please select your favourite language that should be"
  68.         " copied to the Scalos home directory?"
  69.     )
  70. )
  71.  
  72. (set #moduletype-select "Which Moduletype (see help) should be installed?")
  73.  
  74. (set #moduletype-select-help
  75.     (cat
  76.         "The Moduletype is the kind of userinterface that"
  77.         " you'll see when you for example delete files..."
  78.     )
  79. )
  80.  
  81. (set #plugin-select "Do you want to install some useful tools and plugins for Scalos")
  82.  
  83. (set #plugin-select-help
  84.     (cat
  85.         "One plugin for example might be useful for you if you want"
  86.         " a sorted cleanup of the icons..."
  87.     )
  88. )
  89.  
  90. (set #autostart-select "Do you want to install Scalos as Workbench replacement?")
  91.  
  92. (set #autostart-select-help
  93.     (cat
  94.         "If you select YES this installscript will rename the current"
  95.         " LoadWB to LoadWB.orig and install a tiny replacement to load"
  96.         " Scalos intead of the original Workbench"
  97.     )
  98. )
  99.  
  100. (set #startup-scalos "Scalos: assign is about add to you user-startup")
  101.  
  102. (set #startup-scalos-help
  103.     (cat
  104.         "An Assign Scalos: will be added to your user-startup"
  105.     )
  106. )
  107.  
  108. (set #copy-scalos "Copying Scalos (Mainprogram)...")
  109.  
  110. (set #copy-scalosprefs "Copying Scalos Preferences...")
  111.  
  112. (set #copy-libs1 "Copying Library: iconobject.library ...")
  113. (set #copy-libs2 "Copying Library: mcpgfx.library ...")
  114. (set #copy-libs3 "Copying Library: preferences.library ...")
  115. (set #copy-libs7 "Copying Library: newicon.library ...")
  116.  
  117. (set #copy-libs4 "Copying Datatype: amigaiconobject.datatype ...")
  118. (set #copy-libs5 "Copying Datatype: iconobject.datatype ...")
  119. (set #copy-libs6 "Copying Datatype: newiconobject.datatype ...")
  120.  
  121. (set #copy-muilib "Copying MCPFrame.mcc ...")
  122.  
  123. (set #copy-modules "Copying selected modules...")
  124.  
  125. (set #copy-classes "Copying required datatypes (Classes)...")
  126.  
  127. (set #copy-datatypes "Copying required datatypes (Devs)...")
  128.  
  129. (set #copy-catalog "Copying desired translations...")
  130.  
  131. (set #copy-presets "Copying Presets...")
  132.  
  133. (set #copy-plugins "Copying Plugins...")
  134.  
  135. (set #copy-tools "Copying Tools...")
  136.  
  137. (set #copy-guides "Copying Guides...")
  138.  
  139. (set #copy-loadwb "Copying LoadWB replacement...")
  140.  
  141. (set #rename-loadwborg "Renaming of original LoadWB...")
  142.  
  143. (set #rename-loadwbscalos "Renaming/Installing Scalos-LoadWB...")
  144.  
  145.  
  146. (set #mypleasure "My Pleasure!")
  147.  
  148. (set #nomui
  149.     (cat
  150.         "The Install-Script couldn't find a installed MUI-Version!\n\n"
  151.         "MUI 3.6 or higher is required to run Scalos(Prefs)\n\n"
  152.         "Would you like to continue the installation?"
  153.     )
  154. )
  155.  
  156. (set #nomui-help
  157.     (cat
  158.         "MUI is an enhanced userinterface! You can get a"
  159.         " Shareware version via Aminet!"
  160.     )
  161. )
  162.  
  163. (set #makedir-scalos "Creating Scalos-Destination...")
  164.  
  165. (set #makedir-scalos "Creating Prefs-Destination...")
  166.  
  167.  
  168. ;===[ GERMAN ]==============================================================
  169. (if (= @language "deutsch")
  170.     (
  171.     (set languages-default 2)
  172.     )
  173. )
  174. (if (= @language "deutsch")
  175.     (
  176.     (set guides-default 2)
  177.     )
  178. )
  179. ;============================== PROGRAM-START================================
  180.  
  181. (set @default-dest "")
  182.  
  183. ;Check Kickstart (>= v3.0) Version.
  184.  
  185. (if (< (/ (getversion) 65536) 39)
  186.     (abort #bad-kick)
  187. )
  188. (set processor (database "cpu"))
  189. (if (< processor "68020")
  190.     (abort #bad-cpu)
  191. )
  192.  
  193. ;(set muilib-path 0)
  194. ;(if (exists "MUI:Libs/muimaster.library" (NOREQ))
  195. ;    (set muilib-path "MUI:Libs/muimaster.library")
  196. ;    (if (exists "Libs:muimaster.library")
  197. ;        (set muilib-path "Libs:muimaster.library")
  198. ;        (if    (NOT
  199. ;                (askbool
  200. ;                    (prompt #nomui)
  201. ;                    (help   #nomui-help)
  202. ;                )
  203. ;            )
  204. ;            (abort #bad-mui)
  205. ;        )
  206. ;    )
  207. ;)
  208.  
  209. ;(if muilib-path
  210. ;    (if (< (/ (getversion "Libs:muimaster.library") 65536) 17)
  211. ;        (abort #bad-mui)
  212. ;    )
  213. ;)
  214.  
  215. (message #install-start)
  216. (welcome)
  217.  
  218. (complete 0)
  219.  
  220. ;===[ select Scalos Destination ]============================================
  221.  
  222. (if (exists "Scalos:" (NOREQ))
  223.  (
  224.      (set firstinstall 0)
  225.      (set scalos-dest "Scalos:")
  226.  )
  227.  (    (set firstinstall 1)
  228.      (set scalos-dest
  229.         (askdir
  230.             (prompt    #where-scalos)
  231.             (help    #where-scalos-help "\n\n" @askdir-help)
  232.             (default "SYS:Expansion/Scalos")
  233.             (newpath)
  234.         )
  235.     )
  236.     (if (not (exists scalos-dest))
  237.         (makedir scalos-dest
  238.             (prompt #makedir-scalos)
  239.             (help    @makedir-help)
  240.         )
  241.     )
  242.     (makeassign "Scalos" scalos-dest)
  243.  )
  244. )
  245.  
  246.  
  247. (set scalosprefs-dest
  248.     (askdir
  249.         (prompt    #where-scalosprefs)
  250.         (help    #where-scalosprefs-help "\n\n" @askdir-help)
  251.         (default "Scalos:Prefs")
  252.         (newpath)
  253.     )
  254. )
  255.  
  256. (set languages
  257.     (askoptions
  258.         (prompt    #languages-select)
  259.         (help    #languages-select-help "\n\n" @askoptions-help)
  260.         (choices
  261.             "English (built in)"
  262.             "Deutsch"
  263.             "Français"
  264.             "ÃeÓtina"
  265.             "Dansk"
  266.             "Español"
  267.             "Italiano"
  268.             "Svenska"
  269.         )
  270.         (default languages-default)
  271.     )
  272. )
  273.  
  274. (set guides
  275.     (askoptions
  276.         (prompt    #guides-select)
  277.         (help    #guides-select-help "\n\n" @askoptions-help)
  278.         (choices
  279.             "English"
  280.             "Deutsch"
  281.             "Italian"
  282.             "Français"
  283.         )
  284.         (default guides-default)
  285.     )
  286. )
  287.  
  288. ;Preparation for MUI-Library
  289. (if (not (exists "MUI:" (noreq)))
  290.     (set mui-dest
  291.         (askdir
  292.             (prompt    #where-muilib)
  293.             (help    #where-muilib-help "\n\n" @askdir-help)
  294.             (default "Libs:MUI")
  295.         )
  296.     )
  297.     (set mui-dest "MUI:Libs/MUI")
  298. )
  299.  
  300. (set mods
  301.     (askchoice
  302.         (prompt    #moduletype-select)
  303.         (help    #moduletype-select-help "\n\n" @askoptions-help)
  304.         (choices
  305.             "MUI"
  306.             "Class Act"
  307.             "GadTools"
  308.         )
  309.         (default 0)
  310.     )
  311. )
  312.  
  313.  
  314. (set plugin
  315.     (askbool
  316.         (prompt #plugin-select)
  317.         (help #plugin-select-help)
  318.         (default 1)
  319.     )
  320. )
  321.  
  322. (set autostart 0)
  323. (if (NOT (exists "C:LoadWB.orig" (NOREQ)))
  324.     (set autostart
  325.         (askbool
  326.             (prompt #autostart-select)
  327.             (help #autostart-select-help)
  328.             (default 1)
  329.         )
  330.     )
  331. )
  332.  
  333. ;===[ Real Installation ]====================================================
  334.  
  335. ;Create Scalos: Assign
  336. (if firstinstall
  337.  (
  338.     (makedir scalos-dest
  339.         (prompt    #makedir-scalos)
  340.         (help    #makedir-scalos-help "\n\n" @makedir-help)
  341.         (infos)
  342.     )
  343.     (startup @app-name
  344.         (prompt    #startup-scalos)
  345.         (help    #startup-scalos-help "\n\n" @startup-help)
  346.         (command 'Assign Scalos: \"' scalos-dest '\"\n')
  347.     )
  348.  )
  349. )
  350.  
  351. (complete 5)
  352.  
  353. ;Copy Scalos-Mainfile
  354. (copyfiles
  355.     (prompt    #copy-scalos)
  356.     (source    "Scalos")
  357.     (dest    scalos-dest)
  358.     (files)
  359.     (infos)
  360. )
  361.  
  362. (complete 10)
  363.  
  364. ;Copy Prefs
  365. (if (not (exists scalosprefs-dest (NOREQ)))
  366.     (
  367.         (makedir scalosprefs-dest
  368.             (prompt #makedir-prefs)
  369.             (help    @makedir-help)
  370.         )
  371.     )
  372. )
  373.  
  374. (copyfiles
  375.     (prompt    #copy-scalosprefs)
  376.     (source    "Prefs/")
  377.     (dest    scalosprefs-dest)
  378.     (infos)
  379.     (all)
  380. )
  381.  
  382. (complete 20)
  383.  
  384. (copylib
  385.     (prompt    #copy-libs1)
  386.     (source    ("Libs/iconobject.library"))
  387.     (dest    "Libs:")
  388.     (help    @copylib-help)
  389.     (confirm)
  390. )
  391.  
  392. (copylib
  393.     (prompt    #copy-libs2)
  394.     (source    ("Libs/mcpgfx.library"))
  395.     (dest    "Libs:")
  396.     (help    @copylib-help)
  397.     (confirm)
  398. )
  399.  
  400. (copylib
  401.     (prompt    #copy-libs3)
  402.     (source    ("Libs/preferences.library"))
  403.     (dest    "Libs:")
  404.     (help    @copylib-help)
  405.     (confirm)
  406. )
  407.  
  408. (copylib
  409.     (prompt    #copy-libs7)
  410.     (source    ("Libs/newicon.library"))
  411.     (dest    "Libs:")
  412.     (help    @copylib-help)
  413.     (confirm)
  414. )
  415.  
  416. (complete 30)
  417.  
  418. ;Copy MUI Lib:
  419. (copylib
  420.     (prompt    #copy-muilib)
  421.     (source "Libs/MUI/MCPFrame.mcc")
  422.     (dest    mui-dest)
  423.     (help    @copylib-help)
  424.     (confirm)
  425. )
  426.  
  427. (complete 40)
  428.  
  429. ;Copy Required/Selected Modules
  430. (if (= mods 0)
  431.     (set module-path "Modules_MUI")
  432. )
  433. (if (= mods 1)
  434.     (set module-path "Modules_CA")
  435. )
  436. (if (= mods 2)
  437.     (set module-path "Modules_GT")
  438. )
  439.  
  440. (copyfiles
  441.     (prompt    #copy-modules)
  442.     (source    module-path)
  443.     (dest    (tackon scalos-dest "Modules"))
  444.     (all)
  445. )
  446.  
  447. (complete 50)
  448.  
  449. (copylib
  450.     (prompt    #copy-libs4)
  451.     (source    ("Classes/Datatypes/amigaiconobject.datatype"))
  452.     (dest    "SYS:Classes/Datatypes")
  453.     (help    @copylib-help)
  454.     (confirm)
  455. )
  456.  
  457. (copylib
  458.     (prompt    #copy-libs5)
  459.     (source    ("Classes/Datatypes/iconobject.datatype"))
  460.     (dest    "SYS:Classes/Datatypes")
  461.     (help    @copylib-help)
  462.     (confirm)
  463. )
  464.  
  465. (copylib
  466.     (prompt    #copy-libs6)
  467.     (source    ("Classes/Datatypes/newiconobject.datatype"))
  468.     (dest    "SYS:Classes/Datatypes")
  469.     (help    @copylib-help)
  470.     (confirm)
  471. )
  472.  
  473. (complete 60)
  474.  
  475. ;Copy "Devs/Datatypes/#?" To "Devs:Datatypes"
  476. (copyfiles
  477.     (prompt    #copy-datatypes)
  478.     (source    "Devs/Datatypes")
  479.     (dest    "Devs:Datatypes")
  480.     (infos)
  481.     (all)
  482. )
  483.  
  484. (complete 70)
  485.  
  486. ;Copy of the catalog files (with version check)
  487. (if (= (exists "Locale:") 2)
  488.     (
  489.         (set n 0)
  490.         (while
  491.             (set language
  492.                 (select n
  493.                     "English"
  494.                     "Deutsch"
  495.                     "français"
  496.                     "ÃeÓtina"
  497.                     "Dansk"
  498.                     "Español"
  499.                     "Italiano"
  500.                     "Svenska"
  501.                     ""
  502.                 )
  503.             )
  504.             (
  505.                 (if (IN languages n)
  506.                     (if (<> 0 n)   ; No catalog for english strings...
  507.                         (
  508.                             (set catalogs (tackon "Locale/Catalogs" (tackon language "Scalos")))
  509.                             (set destination (tackon "Locale:Catalogs" (tackon language "Scalos")))
  510.                             (makedir destination)
  511. ;-------------------------------------------------------------------------------------------
  512.                             (
  513.                                 (set lala 0)
  514.                                 (while
  515.                                     (set scaloscat
  516.                                         (select lala
  517.                                             "Scalos_Delete.catalog"
  518.                                             "Scalos_ECommand.catalog"
  519.                                             "Scalos_NewDrawer.catalog"
  520.                                             "Scalos_OpenLocation.catalog"
  521.                                             "Scalos_Rename.catalog"
  522.                                             "Scalos_ETrashcan.catalog"
  523.                                             "Scalos_WBInfo.catalog"
  524.                                             "Scalos.catalog"
  525.                                             "ScalosPattern.catalog"
  526.                                             "ScalosPrefs.catalog"
  527.                                             "ScalosPalette.catalog"
  528.                                             "ScalosMenu.catalog"
  529.                                             ""
  530.                                         )
  531.                                     )
  532.                                     (
  533.                                         (if (exists (tackon catalogs scaloscat)) 
  534.                                             (copylib
  535.                                                 (prompt    #copy-catalog)
  536.                                                 (source    (tackon catalogs scaloscat))
  537.                                                 (dest    destination)
  538.                                                 (help    @copylib-help)
  539.                                                 (confirm)
  540.                                             )
  541.                                         )
  542.                                         (set lala (+ lala 1))
  543.                                     )
  544.                                 )
  545.                             )
  546. ;-----------------------------------------------------------------------------------------------
  547.                         )
  548.                     )
  549.                 )
  550.                 (set n (+ n 1))
  551.             )
  552.         )
  553.     )
  554. )
  555.  
  556. ;Copy of the guide files
  557. (
  558.     (set n 0)
  559.     (while
  560.         (set guide
  561.             (select n
  562.                 "Scalos_eng.guide"
  563.                 "Scalos_ger.guide"
  564.                 "Scalos_ita.guide"
  565.                 "Scalos_fr.guide"
  566.                 ""
  567.             )
  568.         )
  569.         (
  570.             (if (IN guides n)
  571.                 (copyfiles
  572.                     (prompt    #copy-guides)
  573.                     (source    guide)
  574.                     (dest    scalos-dest)
  575.                     (files)
  576.                     (infos)
  577.                 )
  578.             )
  579.             (set n (+ n 1))
  580.         )
  581.     )
  582. )
  583.  
  584. (complete 80)
  585.  
  586. ;Copy presets
  587. (copyfiles
  588.     (prompt    #copy-presets)
  589.     (source    "Presets")
  590.     (dest    "SYS:Prefs/Presets")
  591.     (infos)
  592.     (all)
  593. )
  594.  
  595. ;Copy Plugin + Tools
  596. (if plugin
  597.     (
  598.         (copyfiles
  599.             (prompt    #copy-plugins)
  600.             (source    "PlugIns")
  601.             (dest    (tackon scalos-dest "Plugins"))
  602.             (infos)
  603.             (all)
  604.         )
  605.         (copyfiles
  606.             (prompt    #copy-tools)
  607.             (source    "Tools")
  608.             (dest    (tackon scalos-dest "Tools"))
  609.             (infos)
  610.             (all)
  611.         )
  612.     )
  613. )
  614.  
  615. (complete 90)
  616.  
  617. ;Installing LoadWB-Replacement
  618. (if autostart
  619.     (
  620.         (copyfiles
  621.             (prompt #copy-loadwb)
  622.             (source    "LoadWB.Scalos")
  623.             (dest    "C:")
  624.         )
  625.         (if    (rename "C:LoadWB" "C:LoadWB.orig"
  626.                 (prompt #rename-loadwborg)
  627.             )
  628.             (rename "C:LoadWB.scalos" "C:LoadWB"
  629.                 (prompt #rename-loadwbscalos)
  630.             )
  631.         )
  632.     )
  633. )
  634.  
  635. (complete 100)
  636.  
  637. (EXIT #install-exit)
  638.